#ifndef CFIREBALL_H
#define CFIREBALL_H

#include <SDL2/SDL.h>
#include "NpcItem.h"

//https://blog.csdn.net/FlushHip/article/details/83790176
//https://blog.csdn.net/fengmm521/article/details/78438669
class cFireBall : public NpcItem
{
public:
	cFireBall();
	~cFireBall();
	static SDL_Surface *FIREBALLS[4];
	static void InitFireBallImg();

	bool init(int _x, int _y, int dir);
	void update();
	virtual bool init();
	virtual void move(float dt, cPlayer* mario);
	virtual void itemCollision(cPlayer* mario, std::vector<NpcItem *> &items);
	virtual void collisionWithOthers(NpcItem* sprite);
	virtual float TakeDamage(float DamageAmount, struct CDamageEvent const& DamageEvent, NpcItem* DamageCauser);
	bool online;
	SDL_Rect rect;
	int x, y;
	float x_speed, y_speed, ani;
	bool down_touch, center_touch;
	SDL_Rect& GetItemRect();
};

#endif
